﻿<!DOCTYPE HTML>
<html>

	<head>
		<meta charset="UTF-8" />
		<title>iframe 跨页面通信 </title>
	</head>

	<body>
		<pre>
	知识点二：子框架获取父框架内容的方法：window.parent 
	自学思考题：window.parent和window.opener的区别
</pre>

		<div id="subbox">我是SUB</div>
		<script type="text/javascript">
			var pdoc = window.parent;
			var pTxt = pdoc.document.body.innerHTML;
			alert(pTxt);
		</script>

	</body>

</html>